Skip to content

Fix issue where HDR support is not correctly reported #922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

allenwp
Copy link

@allenwp allenwp commented Aug 5, 2025

@allenwp
Copy link
Author

allenwp commented Aug 5, 2025

@microsoft-github-policy-service agree

@walbourn
Copy link
Member

walbourn commented Aug 5, 2025

I see you refactored the code a bit, but I'm trying to see the functional difference. What was wrong before?

If there's a bug here, I want to fix it in my DeviceResources implementation as well. See directx-vs-templates.

@allenwp
Copy link
Author

allenwp commented Aug 5, 2025

I see you refactored the code a bit, but I'm trying to see the functional difference. What was wrong before?

If there's a bug here, I want to fix it in my DeviceResources implementation as well. See directx-vs-templates.

Whitespace changes from a new level of indentation make it harder to see the change: Instead of only checking the default adapter (ThrowIfFailed(m_dxgiFactory->EnumAdapters1(0, &dxgiAdapter));), this PR changes it to iterate through all adapters (while (m_dxgiFactory->EnumAdapters1(adapterI, &dxgiAdapter) == S_OK) {)

Specific instructions on how to reproduce the issue are found in #921

@walbourn
Copy link
Member

walbourn commented Aug 5, 2025

Thanks. Note that != ERROR_NOT_FOUND is problematic for a number of reasons. Try making it:

while (SUCCEEDED(m_dxgiFactory->EnumAdapters1(adapterI, &dxgiAdapter)) {

@allenwp
Copy link
Author

allenwp commented Aug 5, 2025

Thanks. Note that != ERROR_NOT_FOUND is problematic for a number of reasons. Try making it:

while (SUCCEEDED(m_dxgiFactory->EnumAdapters1(adapterI, &dxgiAdapter)) {

Sure. I've currently got it as == S_OK, but I'll switch it over to use the SUCCEEDED convention.

@allenwp allenwp force-pushed the hdr-fix-multi-adapter branch from a222ac4 to 38e818c Compare August 5, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

D3D12HDR::CheckDisplayHDRSupport() is sometimes incorrect
2 participants